package com.zhiyou100.pra;

public class Animals {
    //属性私有化，就属于封装
    private String name;
    private String sex;
    private String weight;

    //对外提供公开的get、set接口
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getWeight() {
        return weight;
    }

    public void setWeight(String weight) {
        this.weight = weight;
    }

    public Animals() {
    }

    public Animals(String name, String sex, String weight) {
        this.name = name;
        this.sex = sex;
        this.weight = weight;
    }
}